import type {AxiosRequestConfig, AxiosResponse} from 'axios'

export interface CVRequestInterceptors<T = AxiosResponse> {
    requestInterceptors?: (config: AxiosRequestConfig) => AxiosRequestConfig
    requestInterceptorsCatch?: (error: any) => any
    responseInterceptors?: (res: T) => T
    responseInterceptorsCatch?: (error: any) => any
}

export interface CVRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
    // 自定义拦截器
    interceptors?: CVRequestInterceptors<T>,
    // 是否显示Loading
    showLoading?: boolean
}
